// ContextObjectMenu.h
//
#ifndef CONTEXTOBJECTMENU_H
#define CONTEXTOBJECTMENU_H

#include <QMenu>
#include <QGraphicsScene>
#include <QList>
#include <QAction>
#include "CustomProxy.h"

namespace IDS {
namespace IDEAS {
namespace OpenGLView {
namespace GUIElements {

class ContextObjectMenu : public QMenu
{
private:
	QGraphicsScene *gs;
	CustomProxy *cp;
	std::vector<QGraphicsProxyWidget *> children;

public:
	ContextObjectMenu(QGraphicsScene *scene, QMenu *parent = NULL);
	ContextObjectMenu(QGraphicsScene *scene, QList<QAction *> &actions, QMenu *parent = NULL);
	virtual ~ContextObjectMenu();

	//void addActions(QList<QAction *> &actions);
	QMenu *addMenu( const QString &title );
	void popUp(int xPos,int yPos);
	CustomProxy *getProxy() {return cp;}
};

}}}}

#endif